1. Field of the Invention
The present invention relates to image processing and, more particularly, to a method of blurring images in real-time using the recursive rendering capabilities of graphics hardware.
2. Description of Related Art
Many computer-based image processing techniques depend heavily on blurring operations for image manipulation. These blurring operations typically use software-based techniques. However, such techniques are highly computationally intensive and are, therefore, rarely fast enough to be computed in real-time at the high resolutions desired for many applications.
Conversely, many 3-D (three dimensional) graphics hardware devices provide basic imaging operations, including blending and texture mapping operations, that run very quickly. However, the above-noted traditional software blurring techniques may not be directly implemented in graphics hardware, due to memory access patterns and lack of sufficient numerical precision. Thus, 3-D graphics hardware devices implement at most simple fixed-radius blurs, or other types of “brute-force” convolution techniques.
For example, to blur an image using the simplest blur technique, a box filter, a range of pixels is averaged and the result is then written to the center pixel. Performing this operation for every pixel in an image results in a blurred image. In graphics hardware, a conventional implementation of a box filter renders the original image translated multiple times, and then averages all of the translated images together to produce a resulting, blurred image. These repeated operations traditionally use “accumulation buffer” hardware to perform the averaging. Accumulation buffers can be used to implement full-screen anti-aliasing techniques, soft shadows, and motion blur effects. In the context of image blurring, an accumulation buffer generally requires time proportional to the square of the filter radius, using one accumulation operation per value in the blur kernel. As a result, large blurs are too expensive to implement directly using accumulation buffer techniques, as a single frame may contain many thousands of accumulation operations.
Accumulation buffers can be simulated using “recursive render-to-texture,” in which the output of each rendering stage is used as a texture map in the next stage. Recursive render to texture has been used to render reflective objects, simulating the multiple bounces that light takes on a path from lights to the viewer of a 3-D scene.
On the other hand, a common implementation of a software image blurring technique is the summed-area table. While computationally efficient, this software-implemented technique also requires a great deal of precision. For example, to blur an 8-bit image, at least 16 bits of precision are needed. Considerably more precision is needed for large radii blurs. This technique is very computationally efficient, generally requiring a constant amount of time regardless of radius. Unfortunately, these high-precision image formats are not available in presently designed graphics hardware.
Hence, there is a need in the art for an efficient image processing technique that makes image blurring a real-time effect, without requiring significantly more precision than is used by the output image. Applications include blurring of video, imagery, and type; motion graphics effects; and 3-D scene display for interactive and production purposes.